<!doctype html>
<html>
<head>
    <meta charset=utf-8>
    <title></title>
    <meta name="robots" content="noindex,nofollow">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <link rel="stylesheet" href="<?=Web_Path?>packs/layui/css/layui.css">
    <link rel="stylesheet" href="<?=Web_Path?>packs/admin/css/font.css">
    <link rel="stylesheet" href="<?=Web_Path?>packs/admin/css/style.css">
    <script src="<?=Web_Path?>packs/js/jquery.min.js"></script>
    <script src="<?=Web_Path?>packs/layui/layui.js"></script>
    <script src="<?=Web_Path?>packs/admin/js/cscms.js"></script>
</head>
<body>
    <span class="layui-breadcrumb" >
        <a ><cite><i class="fa fa-map-marker"></i><?=L('tpl_00')?></cite></a>
        <a href="<?=site_url('user')?>"><?=L('tpl_10')?></a>
        <a href="<?=site_url('user')?>"><?=L('tpl_01')?></a>
    </span>
    <div class="layui-tab layui-tab-brief" >
        <ul class="layui-tab-title">
            <li class="layui-this"><?=L('tpl_02')?></li>
            <li><a class="tablink" href="<?=site_url('user/verify')?>"><?=L('tpl_03')?></a></li>
            <li><a class="tablink" href="<?=site_url('user/log')?>"><?=L('tpl_04')?></a></li>
        </ul>
        <div class="layui-tab-content" style="min-height: 260px;">
            <form class="layui-form layui-form-so" action="<?=site_url('user')?>" method="post">
                <div class="layui-form-item">
                <div class="layui-inline">
                    <label class="layui-form-label"><?=L('tpl_05')?></label>
                    <div class="layui-input-inline">
                        <input style="width:90px;" name="kstime" id="kstime" type="text" value="<?=$kstime?>" class="layui-input" /> 
                    </div>
                    <div class="layui-input-inline">-</div>
                    <div class="layui-input-inline">
                        <input style="width:90px;" name="jstime" id="jstime" value="<?=$jstime?>" type="text" class="layui-input" />
                    </div>
                    <div class="layui-input-inline">
                        <select name="zd">
                            <option value="name" <?php if($zd=='name') echo ' selected';?>><?=L('tpl_06')?></option>
                            <option value="nichen" <?php if($zd=='nichen') echo ' selected';?>><?=L('tpl_07')?></option>
                            <option value="id" <?php if($zd=='id') echo ' selected';?>><?=L('tpl_08')?></option>
                            <option value="email" <?php if($zd=='email') echo ' selected';?>><?=L('tpl_09')?></option>
                        </select>
                    </div>
                    <div class="layui-input-inline">
                        <input type="text" name="key" value="<?=$key?>" class="layui-input">
                    </div>
                    <div class="layui-input-inline">
                        <select name="sid">
                            <option value="0"<?php if($sid==0) echo ' selected';?>><?=L('tpl_11')?></option>
                            <option value="1"<?php if($sid==1) echo ' selected';?>><?=L('tpl_12')?></option>
                            <option value="2"<?php if($sid==2) echo ' selected';?>><?=L('tpl_13')?></option>
                        </select>
                    </div>
                    <div class="layui-input-inline">
                        <select class="select3" name="zid">
                            <option value="0"<?php if($zid==0) echo ' selected';?>><?=L('tpl_14')?></option>
                        <?php
                            $query = $this->db->query("SELECT id,name FROM ".CS_SqlPrefix."userzu order by id asc"); 
                            foreach ($query->result() as $row) {
                                $clas=($row->id==$zid)?' selected="selected"':'';
                                echo '<option value="'.$row->id.'"'.$clas.'>'.$row->name.'</option>';
                            }
                        ?>
                        </select>
                    </div>
                     <div class="layui-input-inline">
                        <button class="layui-btn" type="submit"><?=L('tpl_15')?></button>
                    </div>
                </div>
                </div>
            </form>
            <form class="layui-form" action="<?=site_url('user/del')?>" method="post">
                <table class="layui-table">
                    <thead>
                        <tr>
                            <th><?=L('tpl_16')?></th>
                            <th class="phide minwidth20"><?=L('tpl_17')?></th>
                            <th class="phide minwidth30"><?=L('tpl_18')?></th>
                            <th><?=L('tpl_19')?></th>
                            <th class="phide minwidth50"><?=L('tpl_20')?></th>
                            <th class="phide minwidth30"><?=L('tpl_21')?></th>
                            <th class="phide minwidth30"><?=L('tpl_22')?></th>
                            <th class="phide minwidth30"><?=L('tpl_23')?></th>
                            <th class="minwidth30"><?=L('tpl_24')?></th>
                            <th class="minwidth30"><?=L('tpl_25')?></th>
                            <th class="phide minwidth60"><?=L('tpl_26')?></th>
                            <th class="phide minwidth80"><?=L('tpl_27')?></th>
                            <th><?=L('tpl_28')?></th>
                        </tr>
                    </thead>
                    <tbody>
                    <?php
                        if(empty($user)) echo '<tr><td align="center" height="50" colspan="13">'.L('plub_29').'</td></tr>';
                        foreach ($user as $row) {
                            $logo=$row->logo?'<img class="change" onclick="cscms.get_open(\''.site_url('user/logo').'?id='.$row->id.'\',\''.$row->name.L('plub_30').'\',\'300px\',\'300px\');" width="30" src="'.piclink('logo',$row->logo).'">':'-';
                            //会员状态
                            $zt=($row->sid==0)?'<a title="'.L('plub_31').'" href="javascript:;"><i class="fa fa-check colorl"></i></a>':'<a title="'.L('plub_32').'" href="javascript:;"><i class="fa fa-close colorr"></i></a>';
                            //推荐状态
                            $tj=($row->tid==1)?'<a title="'.L('plub_33').'" href="javascript:"><i class="fa fa-check colorl"></i></a>':'<a title="'.L('plub_34').'" href="javascript:;"><i class="fa fa-close colorr"></i></a>';
                            //认证状态
                            $rz=($row->rzid==1)?'<a title="'.L('tpl_35').'" href="javascript:;"><i class="fa fa-check colorl"></i></a>':'<a title="'.L('tpl_36').'" href="javascript:;"><i class="fa fa-close colorr"></i></a>';
                            //VIP会员
                            $vip=($row->vip>0)?' <i class="colord" style="font-weight: bold;font-size: 10px;">vip</i>':'';
                            //会员组
                            $rowz=$this->db->query("SELECT name FROM ".CS_SqlPrefix."userzu where id=".$row->zid."")->row();
                            $zuname=($rowz)?$rowz->name:L('tpl_43');
                            if(empty($row->nichen)) $row->nichen='-';
                            echo '
                            <tr id="row_'.$row->id.'">
                            <td><input name="id['.$row->id.']" class="xuan" type="checkbox" value="'.$row->id.'" /></td>
                            <td  class="phide minwidth20">'.$row->id.'</td>
                            <td  class="phide minwidth30" id="logo_'.$row->id.'">'.$logo.'</td>
                            <td><a href="'.userlink('index',$row->id,$row->name).'" target="web">'.$row->name.$vip.'</a></td>
                            <td class="phide minwidth30">'.$zuname.'</td>
                            <td class="phide minwidth30">'.$row->rmb.'</td>
                            <td class="phide minwidth30">'.$row->cion.'</td>
                            <td class="phide minwidth30" id="zt_'.$row->id.'" onclick="cscms.ok_no(\''.site_url('user/init/sid').'\','.$row->id.','.$row->sid.',\'zt_\')">'.$zt.'</td>
                            <td class=" minwidth30" id="tj_'.$row->id.'"  onclick="cscms.ok_no(\''.site_url('user/init/tid').'\','.$row->id.','.$row->tid.',\'tj_\')">'.$tj.'</td>
                            <td class=" minwidth30" id="rz_'.$row->id.'" onclick="cscms.ok_no(\''.site_url('user/init/rzid').'\','.$row->id.','.$row->rzid.',\'rz_\')">'.$rz.'</td>
                            <td class="phide minwidth50">'.$row->lognum.'</td>
                            <td class="phide minwidth80">'.date('Y-m-d',$row->addtime).'</td>
                            <td class="basedb-more">
                                <a class="layui-btn layui-btn-mini" href="'.site_url('user/edit').'?id='.$row->id.'">'.L('tpl_37').'</a>
                                <a class="layui-btn layui-btn-mini layui-btn-danger phide" href="javascript:cscms.del_one(\''.site_url('user/del').'\','.$row->id.');">'.L('tpl_38').'</a>
                                <a class="layui-btn layui-btn-mini layui-btn-normal" href="'.site_url('user/log').'?id='.$row->id.'">'.L('tpl_39').'</a>
                            </td>
                            </tr> ';
                        }
                    ?>
                    </tbody>
                </table>
                <div class="more_func">
                    <a class="layui-btn layui-btn-primary layui-btn-small" href="javascript:cscms.select_all();"><i class="fa fa-check colorl" ></i><?=L('tpl_40')?></a>
                    <a class="layui-btn layui-btn-primary layui-btn-small" lay-submit lay-filter="del_pl"><i class="fa fa-close " style="color: red" ></i><?=L('tpl_41')?></a>
                    <a class="layui-btn layui-btn-primary layui-btn-small" href="<?=site_url('user/edit')?>"><i class="fa fa-plus" style="color: #1E9FFF" ></i><?=L('tpl_42')?></a>
                </div>
            </form>
            <div id="page">
                <div class="data_nums phide"><?=$page_data?></div>
                <div class="data_page"><?=$page_list?></div>
            </div>
        </div>
    </div> 
    <script type="text/javascript">
        cscms.init();
        cscms.mode("cscms.getTime('kstime')");
        cscms.mode("cscms.getTime('jstime')");
    </script>
</body>
</html>